Skip to content

frontend: improve amount field of input-with-account-selector#3863

Open
thisconnect wants to merge 1 commit intoBitBoxSwiss:staging-swapfrom
thisconnect:frontend-focus-account-with-input
Open

frontend: improve amount field of input-with-account-selector#3863
thisconnect wants to merge 1 commit intoBitBoxSwiss:staging-swapfrom
thisconnect:frontend-focus-account-with-input

Conversation

@thisconnect
Copy link
Collaborator

The right-hand side of the InputWithAccountSelector component shows amount field with fiat conversion. Only the amount field is an input field. To focus a user had to exactly click/tab on the correct posistion.

Changed the container to be the input label. Native HTML behavior for a container label is to focus the input field when the label is clicked.

Also updated focus and invalid styles and added some hack comments. The hack is more about using CSS selector that affect the child components. Better would be to have normal class and use props to not depend on HTML structure of the child component.

The right-hand side of the InputWithAccountSelector component shows
amount field with fiat conversion. Only the amount field is an
input field. To focus a user had to exactly click/tab on the
correct posistion.

Changed the container to be the input label. Native HTML behavior
for a container label is to focus the input field when the label
is clicked.

Also updated focus and invalid styles and added some hack comments.
The hack is more about using CSS selector that affect the child
components. Better would be to have normal class and use props
to not depend on HTML structure of the child component.
}

.accountSelectorCol > div {
.accountSelectorCol > div { /* hack, would be good if GroupedAccountSelector had a prop to accept a className for the dropdown */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to make a PR to master so we can use normal class without targeting the direct child div.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found and fixed some small bugs and regressions opened PR here #3865

I'll open a PR later for fixing the hacky > div


.inputCol input,
.inputCol input:invalid,
.inputComponent > div:has(input:invalid) { /* '> div' is a bit hack, would be nice to add class directly */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check if we can pass className on the input-number component, will open PR on master

@thisconnect
Copy link
Collaborator Author

With this PR:
Screenshot 2026-02-11 at 16 00 22
Screenshot 2026-02-11 at 16 00 46

before:
Screenshot 2026-02-11 at 16 01 47
Screenshot 2026-02-11 at 16 02 14

@thisconnect thisconnect requested a review from bznein February 11, 2026 15:02
@thisconnect thisconnect changed the title frontend: improve input-with-account-selector behavior frontend: improve amount field of input-with-account-selector Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant